/*
 * pxxdefs.h
 * Copyright (c) 2009, "Eugen Stoian <stoian.e@gmail.com>"
 * 
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 3 of the License, or (at your option)
 * any later version.
 * 
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 * http://www.fsf.org/licensing/licenses/lgpl.txt
 */


#ifndef PXXDEFS_H_
#define PXXDEFS_H_


#ifndef PXX_CEIL4
#define PXX_CEIL4(u) (((u) & 0xFFFFFFFC)+4)
#endif

#ifndef PXX_FLOOR4
#define PXX_FLOOR4(u) ((u) & 0xFFFFFFFC)
#endif

#ifndef PXX_CEIL2
#define PXX_CEIL2(x) (((x) & 0xFFFFFFFE)+2u)
#endif

#ifndef PXX_FLOOR2
#define PXX_FLOOR2(x) ((x) & 0xFFFFFFFE)
#endif

#ifndef PXX_UNALIGNED
#define PXX_UNALIGNED(a) (((unsigned long)a) & 0xF)
#endif

#endif /* PXXDEFS_H_ */
